﻿<Window x:Class="MindDrone.Views.HomeView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Home" Height="620" Width="1000"
        xmlns:vg="clr-namespace:Visifire.Gauges;assembly=WPFVisifire.Gauges"
        DataContext="{Binding HomeViewModel,Source={StaticResource vmLocator}}" Icon="/MindDrone;component/Assets/logo-CampusId.png" BorderBrush="Transparent" BorderThickness="0">
    <Grid Margin="5" x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="80*" />
            <RowDefinition Height="80*" />
            <RowDefinition Height="414*" />
            <RowDefinition Height="30"></RowDefinition>
            <RowDefinition Height="20"></RowDefinition>
        </Grid.RowDefinitions>
        <StackPanel Orientation="Vertical"  Grid.Row="0">
            <TextBlock Text="Mindset: " Margin="0,0,0,10"></TextBlock>
            <StackPanel Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Left">
                <ComboBox x:Name="cboPort" Width="100" Height="30"  SelectedItem="{Binding SelectedPort,Mode=TwoWay}"  ></ComboBox>
                <Button Content="Connect"  Width="100" Height="30" Margin="10,0,0,0" Command="{Binding ConnectCommand}" ></Button>
                <Button Content="Disconnect" Width="100" Height="30"  Margin="10,0,0,0" Command="{Binding DisconnectCommand}"></Button>
               
            </StackPanel>
        
        </StackPanel>
        <!--<Image Source="/MindDrone;component/Assets/fullscreen.png" HorizontalAlignment="Right" Grid.Row="0" Margin="0,0,100,0" Width="40" VerticalAlignment="Top" MouseLeftButtonDown="Image_MouseLeftButtonDown"></Image>-->
        <Image Grid.Row="0" VerticalAlignment="Top" HorizontalAlignment="Right" Source="/MindDrone;component/Assets/logo-CampusId.png" Margin="0,0,0,0" Width="80" x:Name="imgCampudID"></Image>
        <StackPanel Orientation="Vertical" Grid.Row="1">
            <TextBlock Text="Drone:" Margin="0,0,0,10"></TextBlock>
            <StackPanel Orientation="Horizontal">
                <TextBox Width="100" HorizontalAlignment="Left" BorderThickness="1" Height="30" Text="{Binding SsId,Mode=TwoWay}"></TextBox>
                <Button Content="Connect" Margin="10,0,0,0" Width="100" Command="{Binding DroneConnectCommand}"></Button>
                <Button Content="Disconnect" Margin="10,0,0,0" Width="100" Command="{Binding DroneDisconnectCommand}"></Button>
                <Button Content="Take Off" Margin="10,0,0,0" Width="100" Command="{Binding DroneTakeOffCommand}"></Button>
                <Button Content="Land" Margin="10,0,0,0" Width="100" Command="{Binding DroneLandCommand}"></Button>
            </StackPanel>
        
        </StackPanel>
        
        <vg:Gauge x:Name="gaugeMindset" Type="Linear" BackFrameThickness="8" Width="100" Height="300" CornerRadius="5" Grid.Row="2" HorizontalAlignment="Left" VerticalAlignment="Top">
            <vg:Gauge.Indicators>
                <vg:BarIndicator Value="{Binding Meditation}"/>
            </vg:Gauge.Indicators>
        </vg:Gauge>
        <Grid Grid.Row="2" HorizontalAlignment="Right" x:Name="gridImages">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0.5*"></ColumnDefinition>
                <ColumnDefinition Width="0.5*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
       
            <Image x:Name="imageDrone" Grid.Column="0" MaxHeight="320" VerticalAlignment="Top"></Image>
            <StackPanel Orientation="Vertical" Grid.Column="1" Margin="10,0,0,0" x:Name="stackKinect">
                <Image x:Name="imgDepth" MaxHeight="320"></Image>
                <TextBlock x:Name="txtMovementStatus" FontSize="40" HorizontalAlignment="Center"></TextBlock>
            </StackPanel>
        </Grid>
       
        <Grid Grid.Row="3">
            <TextBlock Text="{Binding MindsetSignal,StringFormat='Mindset Signal: \{0\}'}" HorizontalAlignment="Left"></TextBlock>
            <TextBlock Text="{Binding DroneStatus,StringFormat='Drone Status: \{0\}'}" HorizontalAlignment="Center"></TextBlock>
            <!--<TextBlock Text=""> </TextBlock>-->
            
        </Grid>
        <Grid Grid.Row="4">
            <TextBlock Text="Basile Testard, Frederic Kupelian,Marc Mineo, Rodrigue Hajjar" HorizontalAlignment="Right" Margin="0,0,5,0" FontSize="11"></TextBlock>
        </Grid>
    </Grid>
</Window>
